import java.util.Objects;
import java.util.Scanner;

    public class Word {

        public static void main10(String[] args) {
            //方法重载
            int a = 10;
            int b = 20;
            int c = 15;
            int sum1 = sum(a,b);
            int sum2 = max(a,b,c);
            System.out.println(sum1);
            System.out.println(sum2);
        }
        public static int sum(int x,int y) {

            return x+y;
        }
        public static int sum(int x,int y,int z) {

            return x+y+z;
        }
        public static void main9(String[] args) {
            //方法重载
            int a = 10;
            int b = 20;
            int c = 15;
            int max1 = max(a,b);
            int max2 = max(a,b,c);
            System.out.println(max1);
            System.out.println(max2);
        }
        public static int max(int x,int y) {

            return x>y?x:y;
        }
        public static int max(int x,int y,int z) {
            int max1 = x>y?x:y;
            return max1>z?max1:z;
        }
        public static void main8(String[] args) {
            //第二种解法，常规法
            Scanner scanner = new Scanner(System.in);
            int n = scanner.nextInt();
            int c = 1;
            int a = 1;
            int b = 1;
            while(n>2) {
                c = a + b;
                a = b;
                b = c;
                n--;
            }
                System.out.println(c);

        }
        public static void main7(String[] args) {
            //第一种，递归
            Scanner scanner = new Scanner(System.in);
            int n = scanner.nextInt();
            int c = fuc(n);
            System.out.println(c);
        }
        public static int fuc(int n) {
            if(n<=2) {
                return 1;
            } else {
                return fuc(n-1)+fuc(n-2);
            }

        }
        public static void main4(String[] args) {
            //使用函数求最大值,usages
            int a = 100;
            int b = 5;
            int c = 200;
            int max1=max2(a,b);
            int max = max3(max1,c);
           System.out.println("max="+max);

        }
        public static int max2(int x,int y) {
            return x>y?x:y;
        }
        public static int max3(int x,int y) {
            return x>y?x:y;
        }
    public static void main(String[] args) {
        //模拟登陆,未完成
        Scanner scanner = new Scanner(System.in);
        String password = "abcdef";
        int count = 1;
        System.out.print("请输入密码：");

        while(count<=3) {
            String str = scanner.nextLine();
            boolean isEqual = str.equals(password);
            if(isEqual) {
                System.out.println("登录成功");
                break;
            } else {
                System.out.print("密码错误重新输入：");
                count++;
            }

        }
    }
    public static void main3(String[] args) {
        //输出一个整数的每一位
        Scanner scanner = new Scanner(System.in);
        int p = scanner.nextInt();
        while(p!=0) {
            System.out.print(p%10);
            p/=10;
        }
        System.out.println();
    }
    public static void main2(String[] args) {
        //计算值
        int i = 1;
        float sum1 = 0f;
        float sum2 = 0f;
        for(i=1;i<=100;i+=2) {
            sum1+=1.0/i;
        }
        for(i=2;i<=100;i++) {
            sum2-=1.0/i;
        }
        System.out.println(sum1-sum2);
    }
    public static void main1(String[] args) {
        //打印图形
        Scanner scanner = new Scanner(System.in);
        while(scanner.hasNextInt()) {
            int a = scanner.nextInt();//控制行数
            int i = 0;
            for(i=0;i<a;i++) {
                int j = 0;
                for(j=0;j<a;j++) {
                    if(i==j||(i+j)==a-1) {
                        System.out.print("*");
                    } else {
                        System.out.print(" ");
                    }
                }
                System.out.println();
            }

        }
    }
}
